Open
Conversation
epq
reviewed
Aug 31, 2019
| @@ -0,0 +1,4 @@ | |||
| //Q-13: Create two variables -- one to hold the names of the kittens and one to hold the names of the adult cats. Make sure to choose an appropriate data type to hold this information! | |||
Collaborator
There was a problem hiding this comment.
Since the information we want to store is a list of things (names of cats), we should use an array (with the square brackets []).
let nameAdult = ['Mezzo','Sabrina','Josie'];
let nameKitten = ['Kyle Meowry','Luna','Obi','Charlie','Raspberries'];| // Q-11: If I have a variable counter, and I want to increment it by 2, what are three ways I can do this? Add three console.log statements with the three different ways. | ||
| let counter = 0; | ||
| counter = counter + 1; | ||
| console.log(++counter); |
Collaborator
There was a problem hiding this comment.
Those are two ways to increment the variable, and the third way would be
counter +=2 // short way of writing counter = counter + 2;|
|
||
| console.log('I'm awesome'); | ||
|
|
||
| // The problem is in the wronge use of SINGLE QOUTE in I'm. To solve this problem we will have to replace the outer single qoutes to double quotes. |
|
|
||
| // ANSWER | ||
| let age; // declare variable | ||
| console.log('The value of age will be: twentyFive'); // Explain the value of age |
Collaborator
There was a problem hiding this comment.
The instructions might have been unclear - they were asking you to explain what you think the value of age is before you initialize it.
| const favoritesPlacesAndNumbers = ['India','17','Tajikistan','100']; | ||
| console.log(favoritesPlacesAndNumbers); | ||
| // Can you compare infinities? | ||
| console.log('could not answer this question?'); |
Collaborator
There was a problem hiding this comment.
after running the comparison on line 12, do you have an answer?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.